package com.imooc.controller;

import com.imooc.GirlProperies;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by chen on 2017/4/13.
 */
@RestController
@RequestMapping("/cxm")
public class TestController {

//    @Value("${cupSize}")
//    private  String cupSize;
//
//    @Value("${age}")
//    private  int age;
    @Autowired GirlProperies girlProperies;
    //两个端口都可以
//    @RequestMapping(value = {"/hello/{id}","/hi/{id}"},method = RequestMethod.GET)
//    public String say(@PathVariable("id") Integer id) {
        //http://127.0.0.1:8081/girl/cxm/hello/100
//        return "id"+id;
//    }

    @RequestMapping(value = {"/hello"},method = RequestMethod.GET)
    public String say(@RequestParam("id") Integer id2) {
        //http://127.0.0.1:8081/girl/cxm/hello?id=100
        System.out.println("hello");
        System.out.println("hello11");
        System.out.println("hello22");
        System.out.println("hello33");
        return "id"+id2;
    }
}
